<!doctype html>
<html>
<head>
<title>我的收藏</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0, user-scalable=no, width=device-width">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="assets/css/amazeui.min.css">
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<div class="containter">
  <header data-am-widget="header" class="am-header am-header-default">
    <div class="am-header-left am-header-nav">
        <a href="javascript:;"onClick="javascript :window.location.href='heart.html';">
          <img src="assets/images/left.png">
        </a>
    </div>
    <h1 class="am-header-title">
      我的收藏
    </h1>
  </header>
  <div style="width: 100%; height:4rem;"></div>
  <div class="ly-list">
    <ul class="ly">
      <!--<li>
        <a href="">
          <img src="assets/images/image.png" alt="">
          <span>深圳市出发</span>
        </a>
        <div class="order-right">
          <h2>【纯玩】三亚蜈支洲岛南湾猴岛西岛南山四天双飞团</h2>
          <span>天数：4天</span><b>￥1899</b>
          <font>团期：04-18,04-19,04-20</font>
        </div>
      </li>-->
      <!--<li>
        <a href="">
          <img src="assets/images/image.png" alt="">
          <span>深圳市出发</span>
        </a>
        <div class="order-right">
          <h2>【纯玩】三亚蜈支洲岛南湾猴岛西岛南山四天双飞团</h2>
          <span>天数：4天</span><b>￥1899</b>
          <font>团期：04-18,04-19,04-20</font>
        </div>
      </li>
      <li>
        <a href="">
          <img src="assets/images/image.png" alt="">
          <span>深圳市出发</span>
        </a>
        <div class="order-right">
          <h2>【纯玩】三亚蜈支洲岛南湾猴岛西岛南山四天双飞团</h2>
          <span>天数：4天</span><b>￥1899</b>
          <font>团期：04-18,04-19,04-20</font>
        </div>
      </li>
      <li>
        <a href="">
          <img src="assets/images/image.png" alt="">
          <span>深圳市出发</span>
        </a>
        <div class="order-right">
          <h2>【纯玩】三亚蜈支洲岛南湾猴岛西岛南山四天双飞团</h2>
          <span>天数：4天</span><b>￥1899</b>
          <font>团期：04-18,04-19,04-20</font>
        </div>
      </li>-->
    </ul>
    <div id="loading">数据加载中...</div>
			<div id="nomoreData">亲，已经加载完了！</div>
  </div>
  <!-- 目的地 -->
  <div class="am-popup" id="destination">
    <div class="am-popup-inner" style="padding-top:0px">
      <div class="de-left">
        <ul>
          <li><a href="#">港澳台</a></li>
          <li><a href="#">出境游</a></li>
          <li class="active"><a href="#">国内游</a></li>
          <li><a href="#">邮轮</a></li>
          <li><a href="#">自由行</a></li>
        </ul>
      </div>
      <div class="de-right">
        <p><img src="assets/images/location.png">河北省</p>
        <a href="#">石家庄</a>
        <a href="#">石家庄</a>
        <a href="#">石家庄</a>
        <a href="#">石家庄</a>
        <a href="#">石家庄</a>
        <a href="#">石家庄</a>
      </div>
    </div>
  </div>
  <!-- 时间日期 -->
  <div class="am-popup" id="time">
    <div class="am-popup-inner" style="padding-top:0px">
      
    </div>
  </div>
  <!-- 筛选 -->
  <div class="am-popup" id="screen">
    <div class="am-popup-inner" style="padding-top:0px">

    </div>
  </div>
</div>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/amazeui.min.js"></script>
<script src="assets/js/allUse.js"></script>
<script>
  $(".screening ul li ").click(function(){
      $(".screening ul li  ").removeClass("active");
      $(this).addClass("active");
      $(this).fond(".am-popup").css("display","block");
  })
  $(".de-left ul li ").click(function(){
            $(".de-left ul li").removeClass("active");
            $(this).addClass("active");
        })
</script>
		<!--6.9我的收藏-->
		<script type="text/javascript">
			var nextPageToken="";
				myFavorite();
				function myFavorite(){
					$.ajax({
						type: "get",
						url: url_enter+"/api/my_favor_list",
						headers: headers,
						data: {
							"next_page_token":nextPageToken
						},
						success: function(data, status, xhr) {
							console.log(data);
							if(data.result!==1){
								alert(data.result);
								return;
							};
							if(!data.data.favor_list){
								alert("您还没有收藏过任何商品哦");
								history.go(-1);
								return;
							};
							for(var i=0;i<data.data.favor_list.length;i++){
								if(data.data.favor_list[i].time_select==""){
									
									data.data.favor_list[i].time_select="还未选择团期"
								};
								$(".ly").append('<a href="show.html?line_id='+data.data.favor_list[i].line_id+'&from=favorite"><li><div style="float: left;display: inline-block;width: 7.5rem;height:7.5rem;position: relative;margin: 1rem 0;"><img style="height:100%"  src="'
								+data.data.favor_list[i].image+'" alt=""><span style="position:absolute;width: 100%;text-align: center;bottom:0;left: 0;background: rgba(0,0,0,0.5);color:#fff">'
								+data.data.favor_list[i].depart+'出发</span></div><div class="order-right"><h2>'
								+data.data.favor_list[i].title+'</h2><span>天数：'
								+data.data.favor_list[i].days+'天</span><b>￥'
								+data.data.favor_list[i].price+'</b><font>团期：'
								+data.data.favor_list[i].time_select+'</font></div></li></a>')
	
							};
							if(data.data.next_page_token){
								nextPageToken=data.data.next_page_token;
								var scrollHeight=$(document).height();
									$(window).scroll(function(){
										var scrollTop=$(this).scrollTop();
										
										var windowHeight =$(this).height();
										if(scrollTop + windowHeight === scrollHeight){
												myFavorite();　
									    　}
									})
									$("#loading").show();
									$("#nomoreData").hide();
							}else{
								$("#loading").hide();
									$("#nomoreData").show();
							}
						},
						error: function(xhr, status, thrown) {
							console.log(xhr);
						}
					});
				};

		</script>
</body>
</html>